<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@include file="/pageRc/common/common.jsp" %>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="initial-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <meta name="format-detection" content="telephone=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="msapplication-tap-highlight" content="no">
    <script type="text/javascript" src="<%=commonPath %>/pageRc/js/jquery-1.9.1.min.js"></script>
    <link rel="stylesheet" href="<%=commonPath %>/pageRc/layui/css/layui.css" media="all">
    <script type="text/javascript" src="<%=commonPath %>/pageRc/common/utils.js"></script>
    <script type="text/javascript" src="<%=commonPath %>/pageRc/common/msgTool.js"></script>
    <script type="text/javascript" src="<%=commonPath %>/pageRc/layui/layui.js"></script>
    <title>打分评价</title>
    <script type="text/javascript">
        var path = "<%=commonPath%>";
        var msg = new msgTool();
    </script>
</head>
<body>

<div class="main layui-clear">
    <div class="fly-panel fly-panel-user" pad20>
        <div class="layui-tab layui-tab-brief">
            <div class="layui-form layui-tab-content" id="LAY_ucm" style="padding:1.5rem ">
                <div class="layui-tab-item layui-show">
                    <div class="layui-form layui-form-pane">
                        <form method="post" id="formDemo">
                        	<input type="hidden" class="layui-input" value="${rouid}" id="rouid" name="rouid"/>
                        	<div class="layui-form-item">
                                <label for="messageName" class="layui-form-label">评价等级</label>
                                <div class="layui-input-block">
                                    <select name="rank" id="rank">
                                        <option value="1">1</option>
                                        <option value="2">2</option>
                                        <option value="3">3</option>
                                        <option value="4">4</option>
                                        <option value="5">5</option>
                                    </select>
                                </div>
                                <!-- <div id="test2"></div> -->
                            </div>
                        </form>
						<div class="layui-form-item">
                            <button class="layui-btn" style="margin-left: 200px" lay-filter="formProTeamAdd" lay-submit>
                            		提交
                            </button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

</div>

<script type="text/javascript">

	layui.use(['rate'], function(){
	  var rate = layui.rate;
	 
	  //显示文字
	  rate.render({
	    elem: '#test2'
	    ,value: 2 //初始值
	    ,text: true //开启文本
	  });
	});
	  
    layui.use('form', function () {
        var form = layui.form();
        var index = parent.layer.getFrameIndex(window.name); //获取当前窗体索引
        form.on('submit(formProTeamAdd)', function (data) {
        	var rouid = $("#rouid").val();
            msg.sendMsg("/page/main/saveComment.do", data.field, function (data) {
                layer.alert("提交成功！", function () {
                    window.parent.flush();
                    parent.layer.close(index); //执行关闭
                });
            });
            return false;
        });
    });
    
</script>
</body>
</html>